<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class Admin extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'username'    => 'require',
        'password'    => 'require',
        're_password' => 'require',
        'real_name'   => 'require',
        'mobile'      => 'require',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
        'name.require'        => '名称必须填写',
        'password.require'    => '密码必须填写',
        're_password.require' => '重复密码必须填写',
        'real_name.require'   => '真实姓名必须填写',
        'mobile.require'      => '手机号码必须填写',
    ];
}
